﻿@model scheduleMVC.Models.TasksModel

@{
    ViewBag.Title = "Edit";
    SelectListItem[] CustomerNames = ViewBag.Customers;
    SelectListItem[] EmployeeNames = ViewBag.Employees;
}

<h2>Edit</h2>

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <h4>TasksModel</h4>
        <hr />
        @Html.ValidationSummary(true)
        @Html.HiddenFor(model => model.TasksID)

        <div class="form-group">
            @Html.LabelFor(model => model.Name, new { @class = "control-label col-md-2" })
            <div class="col-md-110">
                @Html.EditorFor(model => model.Name)
                @Html.ValidationMessageFor(model => model.Name)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.StartDate, new { @class = "control-label col-md-2" })
            <div class="col-md-110">
                @Html.EditorFor(model => model.StartDate)
                @Html.ValidationMessageFor(model => model.StartDate)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.DueDate, new { @class = "control-label col-md-2" })
            <div class="col-md-110">
                @Html.EditorFor(model => model.DueDate)
                @Html.ValidationMessageFor(model => model.DueDate)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Complete, new { @class = "control-label col-md-2" })
            <div class="col-md-110">
                @Html.EditorFor(model => model.Complete)
                @Html.ValidationMessageFor(model => model.Complete)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Description, new { @class = "control-label col-md-2" })
            <div class="col-md-110">
                @Html.TextAreaFor(model => model.Description)
                @Html.ValidationMessageFor(model => model.Description)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Priority, new { @class = "control-label col-md-2" })
            <div class="col-md-110">
                @Html.EditorFor(model => model.Priority)
                @Html.ValidationMessageFor(model => model.Priority)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Status, new { @class = "control-label col-md-2" })
            <div class="col-md-110">
                @Html.EditorFor(model => model.Status)
                @Html.ValidationMessageFor(model => model.Status)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.AssignementDate, new { @class = "control-label col-md-2" })
            <div class="col-md-110">
                @Html.EditorFor(model => model.AssignementDate)
                @Html.ValidationMessageFor(model => model.AssignementDate)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.CreationDate, new { @class = "control-label col-md-2" })
            <div class="col-md-110">
                @Html.EditorFor(model => model.CreationDate)
                @Html.ValidationMessageFor(model => model.CreationDate)
                
            </div>
        </div>

        <div class="form-group">
            @Html.Label("Employee Name", new { @class = "control-label col-md-2" })
            <div class="col-md-110">
                @Html.DropDownList("Employee_ID", EmployeeNames)
               
            </div>
        </div>

        <div class="form-group">
            @Html.Label("Customer Name", new { @class = "control-label col-md-2" })
            <div class="col-md-110">
                @Html.DropDownList("CustomerID", CustomerNames)
              
            </div>
        </div>

       
        <div class="form-group">
            @Html.Label("Upload file", new { @class = "control-label col-md-2" })
            <div class="col-md-110">
                <input type="file" id="fileUpload" name="fileUpload" size="23" />

            </div>
        </div>



        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Save" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
